package cn.edu.scau.cmi.heyonglin.client;

import java.util.Scanner;

import cn.edu.scau.cmi.heyonglin.simpleFactoryMethod.Meat;
import cn.edu.scau.cmi.heyonglin.simpleFactoryMethod.MeatFactory;

public class SimpleFactoryMethodClient {

	public static void main(String[] args) {
		System.out.println("please select which kind of meat you want to eat:beef,chicken or pork:");
		Scanner s= new Scanner(System.in);
		String meatname=s.next();
		switch(meatname) {
		case "pork":Meat pork=MeatFactory.getMeat("pork");pork.cook();break;
		case "beef":Meat beef=MeatFactory.getMeat("beef");beef.cook();break;
		case "chicken":Meat chicken=MeatFactory.getMeat("chicken");chicken.cook();break;
		default: {System.out.println("sorry,your input is not correct!");break;}
		}
		
	}

}

